package top.jiangqiang.qyblog.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import top.jiangqiang.qyblog.core.base.entity.BaseEntity;

import java.io.Serial;

/**
 * <p>
 * 文章分类
 * </p>
 *
 * @author JiangQiang
 * @since 2023-05-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("qy_category")
@Schema(name = "Category", description = "$!{table.comment}")
public class Category extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "分类名")
    private String name;

    @Schema(description = "分类路径别名")
    private String alias;

    @Schema(description = "父级分类id，顶级分类此字段为0")
    private Long parentId;
}
